<template>
    <div style="display: inline-block" v-if="enable_dist&&hasPermis">
      <square-button :title="title" v-on="$listeners" v-bind="$attrs" @click="showDialog">#</square-button>
      <issue-list-dialog :visible.sync="visible" v-if="visible" v-bind="$attrs" :row="row"></issue-list-dialog>
    </div>
</template>
<script>
    import SquareButton from "@/components/WorkFlowsDialog/Case/SquareButton";
    import IssueListDialog from "../../DocumentCase/IssueListDialog";

    export default {
        name: "IssueButton",
        components: {IssueListDialog, SquareButton},
        inject:{
          realPath:{
            type:String,
            default:""
          }
        },
        props: {
            title: {
                type: String,
                default: "分发传阅"
            },
            row:{
                type:Object,
                default:function () {
                    return {}
                }
            }
        },
        data() {
            return {
                visible:false
            }
        },
        computed: {
          hasPermis(){
              return this.hasPermissions('ffcy',this.realPath)
          },
          enable_dist(){
            return this.$store.getters.enable_dist
          }
        },
        created() {
        },
        methods: {
            showDialog() {
                this.visible=true
            },
        }
    }
</script>

